home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / Form / Sources / Part.h < prev    next >
Encoding:
Text File  |  1996-08-16  |  3.4 KB  |  140 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Part.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Author:                Laurent Delamare
  7. //
  8. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef PART_H
  13. #define PART_H
  14.  
  15. #ifndef DEFINES_K
  16. #include "Defines.k"
  17. #endif
  18.  
  19. // ----- Framework Includes -----
  20.  
  21. #ifndef FWPART_H
  22. #include "FWPart.h"
  23. #endif
  24.  
  25. // ----- OS Layer -----
  26.  
  27. #ifndef FWRESFIL_H
  28. #include "FWResFil.h"
  29. #endif
  30.  
  31. // ----- Foundation Layer -----
  32.  
  33. #ifndef FWSTDDEF_H
  34. #include "FWStdDef.h"
  35. #endif
  36.  
  37. #ifndef FWBNDSTR_H
  38. #include "FWBndStr.h"
  39. #endif
  40.  
  41.  
  42. //========================================================================================
  43. // Forward Declarations
  44. //========================================================================================
  45.  
  46. class FW_CPart;
  47. class FW_CString;
  48. class FW_CMenuBar;
  49. class FW_CMenuEvent;
  50. class FW_CPresentation;
  51. class FW_CPictureShape;
  52.  
  53. //========================================================================================
  54. // CFormPart
  55. //========================================================================================
  56.  
  57. class CFormPart : public FW_CPart
  58. {
  59. //----------------------------------------------------------------------------------------
  60. //    Initialization/Destruction
  61. //
  62. public:
  63.     
  64.     FW_DECLARE_AUTO(CFormPart)
  65.     
  66.     CFormPart(ODPart* odPart);
  67.     virtual ~CFormPart();
  68.  
  69.     virtual void Initialize(Environment* ev);    // Override
  70.  
  71. //----------------------------------------------------------------------------------------
  72. //    Inherited API
  73. //
  74. public:
  75.     virtual FW_CFrame*    NewFrame(Environment* ev,
  76.                                          ODFrame* odFrame,
  77.                                          FW_CPresentation* presentation,
  78.                                          FW_Boolean fromStorage);
  79.  
  80.     virtual FW_CWindow* NewDocumentWindow(Environment* ev);
  81.     virtual FW_Boolean    DoAdjustMenus(Environment* ev,
  82.                                          FW_CMenuBar* menuBar, 
  83.                                           FW_Boolean hasMenuFocus,
  84.                                           FW_Boolean isRoot);
  85.  
  86.     virtual FW_Boolean    DoMenu(Environment* ev,
  87.                                            const FW_CMenuEvent& theMenuEvent);
  88.  
  89.     virtual FW_CContent*    NewPartContent(Environment* ev);
  90.  
  91. //----------------------------------------------------------------------------------------
  92. //    New API
  93. //
  94. public:
  95.     void                InitPicture(Environment* ev);    
  96.     FW_CPictureShape*     GetPictShape1();
  97.     FW_CPictureShape*     GetPictShape2();
  98.     FW_CPresentation*     GetPwdDialogPresentation();
  99.     
  100.     void                 DoFormCommand(Environment* ev, ODCommandID id);
  101.  
  102.     void                 GetResourceString(Environment* ev,
  103.                                              FW_ResourceId multiStringId,
  104.                                              FW_ResourceId stringId,
  105.                                              FW_CString& string);
  106.     
  107. //----------------------------------------------------------------------------------------
  108. //    Data Members
  109. //
  110. private:
  111.     FW_CString255            fTextData;
  112.     FW_Boolean                fIsForm;
  113.     FW_CPictureShape*        fPictShape1;    
  114.     FW_CPictureShape*        fPictShape2;    
  115.  
  116.     FW_CPresentation*        fMainPresentation;
  117.     FW_CPresentation*        fPwdDialogPresentation;
  118. };
  119.  
  120. //==============================================================================
  121. // CFormPart Inlines
  122. //==============================================================================
  123.  
  124. inline FW_CPictureShape* CFormPart::GetPictShape1()
  125. {
  126.     return fPictShape1;
  127. }
  128.  
  129. inline FW_CPictureShape* CFormPart::GetPictShape2()
  130. {
  131.     return fPictShape2;
  132. }
  133.  
  134. inline FW_CPresentation* CFormPart::GetPwdDialogPresentation()
  135. {
  136.     return fPwdDialogPresentation;
  137. }
  138.  
  139. #endif
  140.